*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
************************ DRÄGER AND NGHIEM (2025) ***********************
*INFLATION LITERACY, INFLAION EXPECTATIONS, AND TRUST IN THE CENTRAL BANK: 
*                           A SURVEY EXPERIMENT 
****************** THE REVIEW OF ECONOMICS AND STATISTICS ***************
*********************** (REPLICATION FILES) *****************************
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

***********************   JANUARY 2025  *******************************

***** Note: Read "README.txt for details about the code and data ********

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*** Set STATA
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

*** Clear all ***
clear all
version 18

******************

*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
*** Generate tables and figures in the Online Appendix

*A.2 Bayesian Updating
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*

	use "Inflation_literacy_Jan2025_final.dta" , clear
	
*A.2 Bayesian Updating
	
*Table A13 + A14: Bayesian Updating of Posterior Inflation Expectations

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y inf_exp3y"

	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	*qui: estpost margins, dydx(*)
	eststo
	drop inf_prior
	}
	
	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' i.date_var if wave== 1 & sample_robust_w1_298 == 1
	qui: estpost  
	*qui: estpost margins, dydx(*)
	eststo
	drop inf_prior
	}
	
	foreach y of local target {
	gen inf_prior = `y'_point
	
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1 & further_treatment == further_treatment1 & basic_treatment == basic_treatment1
	qui: estpost  
	*qui: estpost margins, dydx(*)
	eststo
	drop inf_prior
	}
	
	esttab using "TableA13A14.tex", replace style(tex)    b(a2)  numbers nodepvars ///
	 star(* 0.10 ** 0.05 *** 0.01) noconstant booktabs not se(2)	 label ///
	 title(Effect of Treatments on the Uncertainty of Expectations) ///
	stats(r2 N, labels("\text{R$^2$}" "\text{N observations}") fmt(3 0 0))
	
********************************************************************************
********************************************************************************

*Figure A2 + A3: Updating of Inflation Beliefs by Information Treatments

********************************************************************************

*Figure A2: Updating of Inflation Beliefs by Information Treatments: One Year Ahead

*Full sample: Figure A2 a,b 

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y"

	foreach y of local target {
	gen inf_prior = `y'_point
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1, gen(weight_`y')
	drop inf_prior
	}

*Figure A2a
*Graph for control group
	local target "inf_exp1y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
	
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight_`y'] if basic_treatment == 0 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A2a.pdf, as(pdf) replace
}


*Figure A2b
*Graph for literacy treatment group
	
	local target "inf_exp1y inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
		
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight_`y'] if basic_treatment == 1 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A2b.pdf, as(pdf) replace
}


*Controlling date of interview: Figure A2 c,d

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	local target "inf_exp1y"

	foreach y of local target {
	gen inf_prior = `y'_point
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1, gen(weight2_`y')
	drop inf_prior
	}

*Figure A2c
*Graph for control group
	local target "inf_exp1y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	foreach y of local target {
	
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight2_`y'] if basic_treatment == 0 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A2c.pdf, as(pdf) replace
}


*Figure A2d
*Graph for literacy treatment group
	
	local target "inf_exp1y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	foreach y of local target {
		
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight2_`y'] if basic_treatment == 1 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A2d.pdf, as(pdf) replace
}

	
* Excluding the non-compliance: Figure A2 e,f 

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y"

	foreach y of local target {
	gen inf_prior = `y'_point
	qui: rreg `y'_prob  i.further_treatment1##i.basic_treatment1##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1, gen(weight1_`y')
	drop inf_prior
	}

* Figure A2e
* Graph for control group
	local target "inf_exp1y inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
	
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight1_`y'] if basic_treatment1 == 0 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment1) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A2e.pdf, as(pdf) replace
}

* Figure A2f
* Graph for literacy treatment group
	
	local target "inf_exp1y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
		
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight1_`y'] if basic_treatment1 == 1 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment1) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A2f.pdf, as(pdf) replace
}


********************************************************************************

*Figure A3: Updating of Inflation Beliefs by Information Treatments: Three Years Ahead

*Full sample: Figure A3 a, b

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp3y"

	foreach y of local target {
	gen inf_prior = `y'_point
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1, gen(weight_`y')
	drop inf_prior
	}

*Figure A3a
*Graph for control group
	local target "inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
	
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight_`y'] if basic_treatment == 0 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A3a.pdf, as(pdf) replace
}


*Figure A3b
*Graph for literacy treatment group
	
	local target "inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
		
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight_`y'] if basic_treatment == 1 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A3b.pdf, as(pdf) replace
}


*Controlling date of interview: Figure A3 c, d

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	local target "inf_exp3y"

	foreach y of local target {
	gen inf_prior = `y'_point
	qui: rreg `y'_prob  i.further_treatment##i.basic_treatment##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1, gen(weight2_`y')
	drop inf_prior
	}

*Figure A3c
*Graph for control group
	local target "inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	foreach y of local target {
	
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight2_`y'] if basic_treatment == 0 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A3c.pdf, as(pdf) replace
}


*Figure A3d
*Graph for literacy treatment group
	
	local target "inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	foreach y of local target {
		
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight2_`y'] if basic_treatment == 1 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A3d.pdf, as(pdf) replace
}

	
* Excluding the non-compliance: Figure A3 e,f

	estimate clear
	local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp3y"

	foreach y of local target {
	gen inf_prior = `y'_point
	qui: rreg `y'_prob  i.further_treatment1##i.basic_treatment1##c.inf_prior  `controls' if wave== 1 & sample_robust_w1_298 == 1, gen(weight1_`y')
	drop inf_prior
	}

* Figure A3e
* Graph for control group
	local target "inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
	
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight1_`y'] if basic_treatment1 == 0 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment1) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A3e.pdf, as(pdf) replace
}

* Figure A3f
* Graph for literacy treatment group
	
	local target "inf_exp3y"
local controls	" i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	foreach y of local target {
		
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	
	binscatter  `y'_prob `y'_point [weight = weight1_`y'] if basic_treatment1 == 1 &  sample_robust_w1_298 == 1 & wave == 1, by(further_treatment1) control(`controls') col(black blue orange green red)  m(O D T S oh P) xtitle("prior {&pi}") ///
			ytitle("posterior {&pi}") ///
			subtitle("`title0'") /// 
			ylabel(0(2)12) ///
			legend(label (1 "Control 2") label (2 "ECB target") label (3 "ECB targetplus") label (4 "Current inf.") label (5 "Current plus forecast inf.")  ring(0) position(11) rows(5) rowgap(0.02) size(normal) symxsize(8)) 
graph export figure_A3f.pdf, as(pdf) replace
}


********************************************************************************

*Figure A4: Average Marginal Effect of Prior Beliefs on Posterior Beliefs

*Figure A4 a, b: Full sample

*Figure A4a
estimate clear
	local controls	"i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y"
	
	foreach y of local target {
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	qui: rreg `y'_prob i.further_treatment##basic_treatment##c.`y'_point  `controls' if sample_robust_w1_298 == 1 & wave == 1 
	qui: margin further_treatment, over(basic_treatment) dydx(`y'_point)
	qui: marginsplot, l(90) xlabel(, angle(45)) xlabel(0 "Control 2" 1 "ECB target" 2 "ECB targetplus" 3 "Current inf."  4 "Current plus forecast inf."  ) ///
	graphregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) plotregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) title("") ///
	ytitle("") ///
	xtitle("") ///
	subtitle("`title0'") /// 
	ylabel(0(0.2)0.8)
	graph export figure_A4a.pdf, as(pdf) replace
	}

*Figure A4b
estimate clear
	local controls	"i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp3y"
	
	foreach y of local target {
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	qui: rreg `y'_prob i.further_treatment##basic_treatment##c.`y'_point  `controls' if sample_robust_w1_298 == 1 & wave == 1 
	qui: margin further_treatment, over(basic_treatment) dydx(`y'_point)
	qui: marginsplot, l(90) xlabel(, angle(45)) xlabel(0 "Control 2" 1 "ECB target" 2 "ECB targetplus" 3 "Current inf."  4 "Current plus forecast inf."  ) ///
	graphregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) plotregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) title("") ///
	ytitle("") ///
	xtitle("") ///
	subtitle("`title0'") /// 
	ylabel(0(0.2)0.8)
	graph export figure_A4b.pdf, as(pdf) replace
	}
	

*Figure A4 c, d: Controlling for date of interview

*Figure A4c
estimate clear
	local controls	"i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	qui: rreg `y'_prob i.further_treatment##basic_treatment##c.`y'_point  `controls' if sample_robust_w1_298 == 1 & wave == 1 
	qui: margin further_treatment, over(basic_treatment) dydx(`y'_point)
	qui: marginsplot, l(90) xlabel(, angle(45)) xlabel(0 "Control 2" 1 "ECB target" 2 "ECB targetplus" 3 "Current inf."  4 "Current plus forecast inf."  ) ///
	graphregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) plotregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) title("") ///
	ytitle("") ///
	xtitle("") ///
	subtitle("`title0'") /// 
	ylabel(0(0.2)0.8)
	graph export figure_A4c.pdf, as(pdf) replace
	}
	
*Figure A4d
estimate clear
	local controls	"i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany i.date_var"
	local target "inf_exp1y inf_exp3y"
	
	foreach y of local target {
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	qui: rreg `y'_prob i.further_treatment##basic_treatment##c.`y'_point  `controls' if sample_robust_w1_298 == 1 & wave == 1 
	qui: margin further_treatment, over(basic_treatment) dydx(`y'_point)
	qui: marginsplot, l(90) xlabel(, angle(45)) xlabel(0 "Control 2" 1 "ECB target" 2 "ECB targetplus" 3 "Current inf."  4 "Current plus forecast inf."  ) ///
	graphregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) plotregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) title("") ///
	ytitle("") ///
	xtitle("") ///
	subtitle("`title0'") /// 
	ylabel(0(0.2)0.8)
	graph export figure_A4d.pdf, as(pdf) replace
	}
	
*Figure A4 e, f: Excluding non-compliant respondents

*Figure A4e
estimate clear
	local controls	"i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp1y"
	
	foreach y of local target {
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	qui: rreg `y'_prob i.further_treatment##basic_treatment##c.`y'_point  `controls' if sample_robust_w1_298 == 1 & wave == 1 & further_treatment == further_treatment1 & basic_treatment == basic_treatment1
	qui: margin further_treatment, over(basic_treatment) dydx(`y'_point)
	qui: marginsplot, l(90) xlabel(, angle(45)) xlabel(0 "Control 2" 1 "ECB target" 2 "ECB targetplus" 3 "Current inf."  4 "Current plus forecast inf."  ) ///
	graphregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) plotregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) title("") ///
	ytitle("") ///
	xtitle("") ///
	subtitle("`title0'") /// 
	ylabel(0(0.2)0.8)
	graph export figure_A4e.pdf, as(pdf) replace
	}

*Figure A4e
estimate clear
	local controls	"i.age_group college male i.inc_group2 i.employment_group renter hhsize_group East_Germany"
	local target "inf_exp3y"
	
	foreach y of local target {
	if "`y'"=="inf_exp1y" {
		local title0="Inflation expectations in 1 year"
	
	}	
	if "`y'"=="inf_exp3y" {
		local title0="Inflation expectations in 3 years"	
	}	
	qui: rreg `y'_prob i.further_treatment##basic_treatment##c.`y'_point  `controls' if sample_robust_w1_298 == 1 & wave == 1 & further_treatment == further_treatment1 & basic_treatment == basic_treatment1
	qui: margin further_treatment, over(basic_treatment) dydx(`y'_point)
	qui: marginsplot, l(90) xlabel(, angle(45)) xlabel(0 "Control 2" 1 "ECB target" 2 "ECB targetplus" 3 "Current inf."  4 "Current plus forecast inf."  ) ///
	graphregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) plotregion(fcolor(white) ifcolor(white) lcolor(white) ilcolor(white)) title("") ///
	ytitle("") ///
	xtitle("") ///
	subtitle("`title0'") /// 
	ylabel(0(0.2)0.8)
	graph export figure_A4f.pdf, as(pdf) replace
	}

********************************************************************************
********************************************************************************